Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Remove background form description and unclickable fields #1652

Conversation

sabina-talipova
Copy link
Contributor

Description

  • All styles that were applied to readonly fields also were applied to description string. Exclude .form__field-description from list to exclude styles.
  • Readonly input fields is not clickable .

Before:
Screenshot 2024-01-18 at 12 09 46 PM

After:
Screenshot 2024-01-19 at 11 25 26 AM

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should change the PR title to "ENH Remove background from disabled form field descriptions"

@@ -147,7 +147,8 @@
.form__field-holder p.readonly,
.form__field-holder input.readonly,
.form__field-holder span.readonly,
.readonly .form__field-holder > div {
.readonly .form__field-holder > div:not(.form__field-description) {
pointer-events: none;
Copy link
Member

@emteknetnz emteknetnz Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pointer-events: none;

I'm don't think we should be setting this to none in the context of this PR, because I really don't know what all the possible scenarios are, and I don't even know if it's desirable. I did a quick search for this and a couple of comments here were negative about setting this to none

Somewhat related I've raised a new card to handle ->setDisabled(true); and when a TextField is disabled it has no mouse-pointer, though when it's readonly it does have a mouse pointer.

If we're going to remove the mouse-pointer from all readonly form fields in the CMS then it should really be done in a separate issue, not one that's specifically for linkfield

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@sabina-talipova sabina-talipova force-pushed the pulls/2.1/enhance-readonly-fields branch from 9b9cb2a to 3d4ff89 Compare January 22, 2024 19:40
@@ -161,6 +161,10 @@
border-color: $input-focus-border-color;
outline: none;
}

&:hover {
cursor: not-allowed;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be the cursor state. It implies they're doing something wrong by mousing over it, though they may just want to select the text so they can copy-paste it which is perfectly fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@sabina-talipova sabina-talipova force-pushed the pulls/2.1/enhance-readonly-fields branch from 3d4ff89 to 1c6f96b Compare January 23, 2024 21:31
Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase + yarn build to resolve merge conflicts

@sabina-talipova sabina-talipova force-pushed the pulls/2.1/enhance-readonly-fields branch from 1c6f96b to bedad80 Compare January 23, 2024 22:58
@emteknetnz emteknetnz merged commit 493909d into silverstripe:2.1 Jan 24, 2024
12 checks passed
@emteknetnz emteknetnz deleted the pulls/2.1/enhance-readonly-fields branch January 24, 2024 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants